package ogmios.components.munches;
 
/**
 * An event object that contains information on the completed execution of one or more Chainables.
 */
public class ChainEvent 
{
 private final Chainable chainable;
 private final boolean successful;

 public ChainEvent(Chainable chainable, boolean successful)
 {
   this.chainable = chainable;
   this.successful = successful;
 }

 /**
 * Returns the last Chainable in the chain
 */ 
 public Chainable getChainable()
 {
  return chainable;
 }
 
 /**
 * Returns whether the chain completed successfully, or failed.
 */
 public boolean wasSuccessful()
 {
  return successful;
 }

}
